from django.shortcuts import render
from rest_framework import permissions
from utils.customer_modelviewset import CustomModelViewSet
from apps.member.category.models import Category, Label
from .serializers import CategorySerializer, LabelSerializer


# Create your views here.


class CategoryViewSet(CustomModelViewSet):
    permission_classes = [permissions.IsAdminUser, ]
    queryset = Category.objects.filter()
    serializer_class = CategorySerializer


class LabelViewSet(CustomModelViewSet):
    permission_classes = [permissions.IsAdminUser, ]
    queryset = Label.objects.filter()
    serializer_class = LabelSerializer
